#include "Player.h"
#include "Commodity.h"
#include <map>
#include <iostream>

using namespace std;


map<Commodity, int>* Player::inventory = NULL;

Player::Player(void)
{
}

Player::Player(string construct_name)
{
	name = construct_name;
	cash = 2000.00;
}

void Player::add_items(Commodity purchased, int amount)
{
	if (inventory)
	{
		cout << "player has loot" << endl;
	}
	else
	{
		cout << "player has nothing!" << endl;
	}
}
//	// cycle through inventory and see if we aleady have that commodity
//	// If so average out the price.
//	for (auto it = inventory.begin(); it!= inventory.end(); ++it)
//	{
//		cout << "test!" << endl;
//
//		if (it->first.get_name() == purchased.get_name())
//		{
//			cout << "found" << endl;
//		}
//
//	}
//
//}

void clear_inventory(void)
{
	map<Commodity, int>* inventory = NULL;
}

Player::~Player(void)
{
}
